package com.bdmc.work.service;

import com.bdmc.common.core.domain.PageQuery;
import com.bdmc.common.core.mybatisplus.core.IServicePlus;
import com.bdmc.common.core.page.TableDataInfo;
import com.bdmc.work.domain.WorkOrder;
import com.bdmc.work.domain.bo.WorkOrderBo;
import com.bdmc.work.domain.vo.WorkOrderSumVo;
import com.bdmc.work.domain.vo.WorkOrderVo;

import java.util.Collection;
import java.util.List;

/**
 * 清运任务工单Service接口
 *
 * @author bdmc
 * @date 2022-03-30
 */
public interface IWorkOrderService extends IServicePlus<WorkOrder, WorkOrderVo> {
	/**
	 * 查询单个
	 * @return
	 */
	WorkOrderVo queryById(Long orderId);

	/**
	 * 查询列表
	 */
    TableDataInfo<WorkOrderVo> queryPageList(WorkOrderBo bo, PageQuery pageQuery);

	/**
	 *分页查询列表
	 */
	TableDataInfo<WorkOrderVo> mySelectPage(WorkOrderBo bo, PageQuery pageQuery);

	/**
	 * 统计页面的分页查询
	 * @param bo
	 * @param pageQuery
	 * @return
	 */
	TableDataInfo<WorkOrderSumVo> sumSelectPage(WorkOrderBo bo, PageQuery pageQuery);

	List<WorkOrderSumVo> sumSelectPage(WorkOrderBo bo);
	/**
	 * 查询列表
	 */
	List<WorkOrderVo> queryList(WorkOrderBo bo);

	/**
	 * 根据新增业务对象插入清运任务工单
	 * @param bo 清运任务工单新增业务对象
	 * @return
	 */
	Boolean insertByBo(WorkOrderBo bo);

	/**
	 * 根据编辑业务对象修改清运任务工单
	 * @param bo 清运任务工单编辑业务对象
	 * @return
	 */
	Boolean updateByBo(WorkOrderBo bo);

	/**
	 * 校验并删除数据
	 * @param ids 主键集合
	 * @param isValid 是否校验,true-删除前校验,false-不校验
	 * @return
	 */
	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
}
